package com.jiali.backend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jiali.backend.common.ResponseResult;
import com.jiali.backend.controller.request.LoginRequest;
import com.jiali.backend.controller.request.RegisterRequest;
import com.jiali.backend.controller.request.UserInfoUpdateRequest;
import com.jiali.backend.model.User;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartFile;


/**
* @author piko
* @description 针对表【user】的数据库操作Service
* @createDate 2025-02-19 22:51:42
*/
public interface UserService extends IService<User> {
    /**
     * 登录
     */
    ResponseResult<User> userLogin(LoginRequest loginRequest, HttpServletRequest request);
    /**
     * 注册
     */
    ResponseResult<User> userRegister(RegisterRequest registerUser);
    /**
     * 退出登录
     */
    ResponseResult<User> userLogout(HttpServletRequest request);
    /**
     * 获取当前登录用户
     */
    ResponseResult<User> getCurrentUser(HttpServletRequest request);
    /**
     *更新用户信息
     */
    ResponseResult<User> updateUserInfo(UserInfoUpdateRequest userInfoUpdateRequest, HttpServletRequest request);
    //更新用户头像
    ResponseResult<User> updateAvatar(MultipartFile file, HttpServletRequest request);
}
